/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>Project: spring2022 - Book
 * <p>Powered by webrx On 2022-03-17 17:38:56
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@Data @Repository("book")
public class Book {
    @Value("10,20,30")
    private int[] nums;

    @Value("#{'java,php,html,mysql,php,html'.split(',')}")
    private Set<String> set;

    @Value("#{'java,php,html,mysql,php,html'.split(',')}")
    private List<String> list;

    @Value("#{{name:'lisi',age:18,is:true}}")
    private Map<String,Object> map;


    @Value("#{user.name}") //容器中的对象的属性方法
    private String tname;

    @Value("${db.url}")
    private String url;

    @Value("${author}") //${} 配置文件db.properties中的数据
    private String author;
}
